package com.workingpub.commons.utils.exception;

public abstract class AbstractBaseException extends RuntimeException {

	private static final long serialVersionUID = 4379109209568537216L;

	private String code;

	public AbstractBaseException(String code, String message) {
		this(code, message, null);
	}

	public AbstractBaseException(String code, String message, Throwable ex) {
		super(message, ex);
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String getMessage() {
		return String.format("[%s]%s", code, super.getMessage());
	}

}
